﻿namespace Vdc.Interface
{
    using System;
    using System.Text;

    internal class JSHelper
    {
        public static string AddStyleSheet(string pathToCssFile)
        {
            StringBuilder builder = new StringBuilder();
            builder.Append("var tempStyleSheet=document.createElement('link');");
            builder.Append("tempStyleSheet.rel='stylesheet';");
            builder.Append("tempStyleSheet.type='text/css';");
            builder.Append("tempStyleSheet.href=\"" + pathToCssFile + "\";");
            builder.Append("document.getElementsByTagName('head')[0].appendChild(tempStyleSheet);");
            return builder.ToString();
        }
    }
}

